<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

</head>
<body>
	<%
	    String bip = (String) request.getAttribute("bip");
	    String mip = (String) request.getAttribute("mip");
	    String url = (String) request.getAttribute("url");
	    String aip = request.getLocalAddr();
	    
	    session.setAttribute("bip", bip);
	    session.setAttribute("mip", mip);
	    session.setAttribute("url", url);
	    session.setAttribute("aip", aip);
	%>

	<br />
	IP BROWSER : <%=bip%><br /> 
	IP MERCHAT : <%=mip%><br /> 
	IP REMOTE : <%=request.getRemoteAddr()%><br /> 
	URL : <%=url%><br />
	<br />

	<form id="formForward" action="https://appserver1:8443/app/app2" method="post">
		<input type="hidden" id="bip" name="bip" value="<%=bip%>" /> 
		<input type="hidden" id="mip" name="mip" value="<%=mip%>" /> 
		<input type="hidden" id="aip" name="aip" value="<%=aip%>" />
		<input type="hidden" id="url" name="url" value="<%=url%>" />
		<input type="submit" value="Submit to App Servlet">
	</form>

	<form id="formForward" action="http://58.181.220.230:38080/pay/p.jsp" method="post">
		<input type="hidden" id="bip" name="bip" value="<%=bip%>" /> 
		<input type="hidden" id="mip" name="mip" value="<%=mip%>" /> 
		<input type="hidden" id="aip" name="aip" value="<%=aip%>" />
		<input type="hidden" id="url" name="url" value="<%=url%>" />
		<input type="submit" value="Submit to Pay">
	</form>
	
	<input type="button" value="Redirect Forward App" onclick="document.location = 'https://appserver1:8443/app/forward.jsp'">

</body>
</html>